package cn.northsea.service.impl;

import cn.northsea.mapper.OrderMapper;
import cn.northsea.pojo.Order;
import cn.northsea.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Date;
import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public void addOrder(Double money, Integer productvoId, Date format, Integer id, String orderAddress, String orderUphone) {
        orderMapper.addOrder(money, productvoId, format, id, orderAddress, orderUphone);
    }

    @Override
    public List<Order> findAll(String start, String end) {
        return orderMapper.findAll(start, end);
    }

    @Override
    public List<Order> findAll1(Integer userId, String start, String end) {
        return orderMapper.findAll1(userId, start, end);
    }

    @Override
    public void refund(Integer id) {
        orderMapper.refund(id);
    }
}
